package messages;

public class InvitationMessage extends Message {

	public InvitationMessage(String destinyLogin, String gameName) {
		super();
		
		this.destinyLogin = destinyLogin;
		this.gameName = gameName;
	}
	
	
	public String getOriginLogin() {
		return this.originLogin;
	}
	
	public void setOriginLogin(String originLogin) {
		this.originLogin = originLogin;
	}
	
	
	public String getDestinyLogin() {
		return this.destinyLogin;
	}

	
	public String getGameName() {
		return this.gameName;
	}
	
	
	/**
	 * Returns an invitation identifier the destiny must include in the reply message.
	 * 
	 * @return An invitation identifier the destiny must include in the reply message.
	 */
	public int getReplyId() {
		return this.replyId;
	}


	/**
	 * Sets the invitation identifier.
	 * 
	 * @param replyId The new invitation identifier.
	 */
	public void setReplyId(int replyId) {
		this.replyId = replyId;
	}
	
	
	@Override
	public String toString() {
		return super.toString() + " Invitation (" + this.replyId + ") from " + this.originLogin + " to " + this.destinyLogin + " [game=" + gameName + "]";
	}
	
	
	private String originLogin;		// The player who made the invitation
	private String destinyLogin;
	private String gameName;
	private int replyId;		// An invitation identifier assigned by the Controller that
								// the destiny must include in the reply message.

	private static final long serialVersionUID = 1L;

	
}
